package com.dxysun.servlet;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public class HelloServlet extends HttpServlet
{

    @Override
    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException
    {
        doPost(req, resp);
    }

    @Override
    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException
    {
        System.out.println("hello");
        resp.getWriter().println("hello world servlet");
    }
}
